package com.kuzan.autocloud.common.model.form;

import com.kuzan.autocloud.common.model.form.link.FormSyeneryLink;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * <p>Description: </p>
 *
 * @author kuzank
 */
@Data
@NoArgsConstructor
@Entity
@Table(name = "sys_form_synergy")
public class FormSynergy extends FormSyeneryLink {

    @Column(length = 32)
    private String report;
    @Column
    private String linkkey;

    public static FormSynergy of(String title, String form, String report, String linkkey, String id) {
        FormSynergy synergy = new FormSynergy();
        synergy.setTitle(title);
        synergy.setForm(form);
        synergy.setReport(report);
        synergy.setLinkkey(linkkey);
        synergy.setId(id);
        synergy.setSort(getSortIncrement());
        return synergy;
    }

}
